<!DOCTYPE HTML>
<html lang="fr">
<head>
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>

	<meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

	<!-- Bootstrap -->
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap<?php echo (($this->skin <> '') ? "-".$this->skin : "");?>.min.css" rel="stylesheet" media="screen">
	<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/css/font-awesome/css/font-awesome.min.css">
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap-datepicker.css" rel="stylesheet" media="screen">
	
	<!-- Fonts -->
	<link href='http://fonts.googleapis.com/css?family=Oxygen' rel='stylesheet' type='text/css'>

	<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!--[if lt IE 9]>
	<script src="../../assets/js/html5shiv.js"></script>
	<script src="../../assets/js/respond.min.js"></script>
	<![endif]-->
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/selavenir.css" rel="stylesheet" media="screen">
</head>

<body>

	<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
		<div class="container">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
			</div>

			<!-- Collect the nav links, forms, and other content for toggling -->	
			<div class="collapse navbar-collapse navbar-ex1-collapse">
				<?php echo CHtml::link('SELAVENIR - Administration',array('site/admin'),array("class"=>"navbar-brand"));?>

				<ul class="nav navbar-nav navbar-right">
					<?php echo "<li id=\"menu_validation\" data-toggle=\"tooltip\" data-placement=\"bottom\" data-container=\"body\" data-title=\"Actions à valider\"" . (($this->route == "site/valider") ? " class='active'>" : ">") . CHtml::link('<span class="fa fa-check-square fa-lg fa-fw"></span>',array('site/valider')) . "</li>";?>		
					<?php echo "<li id=\"menu_selistes\" data-toggle=\"tooltip\" data-placement=\"bottom\" data-container=\"body\" data-title=\"Gérer les sélistes\"" . (($this->id == "seliste") ? " class='active'>" : ">") . CHtml::link('<span class="fa fa-lg fa-users fa-fw"></span>',array('seliste/admin')) . "</li>";?>		
					<?php echo "<li id=\"menu_catalogue\" data-toggle=\"tooltip\" data-placement=\"bottom\" data-container=\"body\" data-title=\"Gérer le catalogue\"" . (($this->route == "grain/admin") ? " class='active'>" : ">") . CHtml::link('<span class="fa fa-lg fa-book fa-fw"></span>',array('grain/admin')) . "</li>";?>		
					<?php echo "<li id=\"menu_demandes\" data-toggle=\"tooltip\" data-placement=\"bottom\" data-container=\"body\" data-title=\"Gérer les demandes\"" . (($this->route == "demande/admin") ? " class='active'>" : ">") . CHtml::link('<span class="fa fa-lg fa-question fa-fw"></span>',array('demande/admin')) . "</li>";?>
					<?php echo "<li id=\"menu_domaines\" data-toggle=\"tooltip\" data-placement=\"bottom\" data-container=\"body\" data-title=\"Gérer les domaines\"" . (($this->route == "domaine/admin") ? " class='active'>" : ">") . CHtml::link('<span class="fa fa-lg fa-cubes fa-fw"></span>',array('domaine/admin')) . "</li>";?>
					<?php echo "<li id=\"menu_historique\" data-toggle=\"tooltip\" data-placement=\"bottom\" data-container=\"body\" data-title=\"Historique des actions\"" . (($this->route == "histoAdmin/admin") ? " class='active'>" : ">") . CHtml::link('<span class="fa fa-lg fa-clock-o fa-fw"></span>',array('histoAdmin/admin')) . "</li>";?>
					<?php echo "<li id=\"menu_admin\" data-toggle=\"tooltip\" data-placement=\"bottom\" data-container=\"body\" data-title=\"Quitter l'administration\">" . CHtml::link('<span class="fa fa-sign-out fa-lg fa-fw"></span>',array('site/index')) . "</li>";?>
					<?php Yii::app()->getClientScript()->registerScript('tooltip_menu', "$('#menu_validation').tooltip();$('#menu_selistes').tooltip();$('#menu_catalogue').tooltip();$('#menu_demandes').tooltip();$('#menu_domaines').tooltip();$('#menu_historique').tooltip();$('#menu_admin').tooltip();",CClientScript::POS_READY);?>
				</ul>
				
			</div><!-- /.navbar-collapse -->
		</dir>
	</nav>
				
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<?php echo $content;?>
			</div>
		</div>
	</div>
		
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<?php 
	$cs = Yii::app()->getClientScript();
	$cs->registerCoreScript('jquery');
	?>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/bootstrap.min.js"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/bootstrap-datepicker.js"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/locales/bootstrap-datepicker.fr.js" charset="UTF-8"></script>
	<?php 
	if ($this->route <> "seliste/update_grains") {
	?>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/admin.js"></script>
	<?php 
	}
	?>
</body>
</html>